﻿using System;
using EPocalipse.IFilter;

namespace Sherwood.Content.UpdateServices.Attachments
{
    public static class FileContent
    {
        public static bool TryGet(string fileName, out string content)
        {
            try
            {
                using (var filterReader = new FilterReader(fileName))
                    content = filterReader.ReadToEnd();
                return true;
            }
            catch(ArgumentException)
            {
                content = null;
                return false;
            }
        }
    }
}